<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="css/bootstrap.css" />
	<link rel="stylesheet" href="css/wall.css" />
	<title>新项目</title>
	<script type="text/javascript" src="js/jquery.js"></script>
	<style type="text/css">
		.first-1{
			padding-top:100px;
			height:300px;	
			}
		.sed-1{
			margin-left:200px;
			padding-top:30px;
			}
	</style>	
</head>
<body class="body">
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a href="#" class="brand">项目管理软件</a>
			</div>
		</div>
	</div>
	<div class="container">		
		<form class="form-horizontal" id="myform" method="post" action="project.jspx?_m=save_edit&id=${project.id }">
			<fieldset class="first-1">
				<div>
					<h1 style="height:50px;">修改一个新项目</h1>
				</div>	
				<div class="control-group">
					<label class="control-label" for="input01">项目名称</label>
					<div class="controls">
						<input type="text" class="span5" id="error_name" x-webkit-speech="undefined" name="name" value="${project.projectname }">
						<p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="input01">项目描述</label>
					<div class="controls">
						<textarea class="span5" rows="4" name="miaoshu"  id="error_miaoshu" >${project.projecttext }</textarea>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="multiSelect">负责人</label>
					<div class="controls">
						<select id="error_multiSelect" name="multiSelect">
						
							<c:forEach items="${requestScope.name}" var="p">
							<c:choose>
								<c:when test="${project.fuzeren eq p.username}">
								<option selected>${p.username}</option>
								</c:when>
								<c:when test="${project.fuzeren  ne p.username}">
								<option selected>${p.username}</option>
								</c:when>
							</c:choose>
							</c:forEach>
							
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="input01">项目成员</label>
					<div class="controls">
						<input type="text" class="span5" id="error_ren" x-webkit-speech="undefined" name="ren"  value="${project.chengyuan }">
					</div>
				</div>
				<div class="sed-1">
					<button type="button" id="btn" class="btn btn-primary">修改</button>
					<button class="btn" onclick="location.back()">返回</button>
<<<<<<< .mine
					
=======
>>>>>>> .r108
				</div>
			</fieldset>
		</form>          
	</div>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#btn").click(function(){
				var name = $("input[name = 'name']").val();
				var miaoshu = $("input[name = 'miaoshu']").val();
				var multiSelect = $("input[name = 'multiSelect']").val();
				var ren = $("input[name = 'ren']").val();
				
				if(name.trim() == ""){
					$("#error_name").html("请输入项目名称");
					return;
				}
				if(miaoshu == ""){
					$("#error_miaoshu").html("请输入项目的描述");
					return;
				}
				if(multiSelect == ""){
					$("#error_multiSelect").html("请选择项目的负责人");
					return;
				}
				if(ren == ""){
					$("#error_ren").html("请输入项目的成员");
					return;
				}
				$("#myform").submit();
			});
		});
	</script>
</body>

</html>
